allRoom = [
    # used:房间状态0是未预定，1是已预定未住，2是已有住户
    # info:当前房间信息
    # customer:用来存放顾客姓名、性别、押金、房类型、价格、房号、价格、
    # 证件类型、证件号码、联系电话、入住日期、离开日期
    # history:存放历史入住顾客
    {'used': 0, 'customer': {}, 'info': {'num':'101'}, 'history': []},
    {'used': 0, 'customer': {}, 'info': {'num':'102'}, 'history': []},
    {'used': 0, 'customer': {}, 'info': {'num':'103'}, 'history': []},
    {'used': 0, 'customer': {}, 'info': {'num':'104'}, 'history': []},
    {'used': 0, 'customer': {}, 'info': {'num':'105'}, 'history': []},
]

# 操作信息
allOperate = []


# 前台操作
def fontMange():
    print('前台')


# 预定
def getOrder():
    print('''
    1.预定房间
    2.预定入住
    3.解除预定
    ''')
    value = int(input())
    if(value == 1):
        print('请输入预定者信息（姓名、性别、证件类型、证件号码）')
        customer = input()
        resCustomer = customer.split()
        if(len(resCustomer) == 4):
            for j in allRoom:
                if j['used'] == 0:
                    j['customer']['name']= resCustomer[0]
                    j['used'] = 1
                    j['customer']['gender']= resCustomer[1]
                    j['customer']['status']= resCustomer[2]
                    j['customer']['id']= resCustomer[3]
                    print('预定成功预定房号为',j['info']['num'])
                    break
    elif value == 2:
        pass
    else:
        for i in allRoom:
            if i['used'] ==1:
                print('可解除的房间有')
                print(i['info']['num'])

# 信息查询
def infoMange():
    print('信息查询')

# 报表统计


def tableStatistics():
    print('表格统计')


# 功能选择
def chooseFunction(value):
    FunctionList = {
        '1': fontMange,
        '2': getOrder,
        '3': infoMange,
        '4': tableStatistics
    }
    return FunctionList.get(value)()


if __name__ == "__main__":
    print('''
    -----------功能选择-----------
    1.前台操作
    2.预定管理
    3.信息查询
    4.报表统计
    按Q退出系统
    ''')
    # 当前选中功能
    curFunction = input('请输入需要选择的功能序号按回车键确认:')
    chooseFunction(curFunction)
    print(allRoom)